/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bio.immune.adaptive;

import bio.BioObject;
import bio.cell.receptors.Immunoglobulin;

/**
 *
 * @author erik
 */
public class BCell implements Lymphocyte {
    public Environment;
    public String type;
    public Immunoglobulin ig;
    
    public BCell() {
        this.type = "naive";
        this.ig = new Immunoglobulin();
    }
    
    public void exposeToAntigen(BioObject antigen) {
        if (antigen.isBindable()) {
            if (ig.getState().equals("unbound")) {
                    ig.bindToTarget(antigen);
                    ig.setSpecificity(antigen);
                    this.type = "plasma";
                    this.generateAntibodies();
            }
            
        }
        
    }
    
    public void generateAntibodies() {
        if (this.type.equals("plasma")) {
            
        }
    }
    
    @Override
    public boolean isBindable() {
        return false;
    }

    @Override
    public String getType() {
        return this.type;
    }
    
}
